package com.fay.designPattern.oop.virtualWallet.anaemic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.math.BigDecimal;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/2/23 21:59
 * @Version 1.0
 */
@Controller
public class VirtualWalletController {

    @Autowired
    private VirtualWalletService virtualWalletService;

    // 查询余额
    public BigDecimal getBalance(Long walletId) {
        return BigDecimal.ONE;
    }

    // 出账
    public void debit(Long walletId, BigDecimal amount) {
        //...
    }

    // 入账
    public void credit(Long walletId, BigDecimal amount) {
        //...
    }

    //转账
    public void transfer(Long fromWalletId, Long toWalletId, BigDecimal amount) {

    }
}
